namespace WindowsFormsQuickStart._1113;

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        Form f1 = new Login();
        f1.Show();
        MessageBox.Show("即将跳转至登陆页面");
    }

    private void button2_Click(object sender, EventArgs e)
    {
        Form f2 = new Register();
        f2.Show();
        MessageBox.Show("即将跳转至注册页面");
        //隐藏当前窗体
        f2.Hide();
        //showDialog作用是阻塞当前窗体，等待用户操作
        f2.ShowDialog();
    }
}